package com.example.openfeign.controller;

import com.example.openfeign.service.DemoFeignApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 杨雄杰
 * @Date: 2021/5/26 4:18 下午
 */
@RestController
public class DemoController {
    @Autowired(required = false)
    DemoFeignApi api;

    @GetMapping("/consul/feign/demo")
    public String demo() {
        return api.demo();
    }
}